package com.qmyx.supplychain.quartz.task;

import com.ytjj.qmyx.supplychain.service.MailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author jiawei
 * @date 2024年04月09日 11:07
 * @describe
 */
@Component
@Slf4j
public class EmailWarningTask {

    @Resource
    MailService mailService;

    @Scheduled(cron = "0 0/2 * * * ?")
    public void receiveMail() {
        log.info("=============> 开始监控邮件异常预警！====");
        mailService.receiveMail();
        log.info("=============> 结束监控邮件异常预警！====");
    }
}
